package com.sskj.one.mine;


import com.sskj.common.base.HttpData;
import com.sskj.common.util.MD5Util;
import com.sskj.lib.http.JsonCallBack;
import com.sskj.one.presenter.BasePresenter;

import java.io.File;

/**
 * @author Hey
 * Create at  2019/06/10
 */
class AddAlipayPresenter extends BasePresenter<AddAlipayActivity> {

    public void addAlipay(String name, String account, String pwd, File image) {
        httpService.addAlipay(name, account, MD5Util.getFiveMd5Value(pwd),image)
                .tag(this)
                .execute(new JsonCallBack<HttpData>(this) {
                    @Override
                    public void onHTTPSuccess(HttpData data) {
                        mView.addAlipayOK(name,account);
                    }
                });
    }
}
